<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <h:head>
        <title>SGPF</title>
        <h:outputStylesheet library="css" name="layout.css"/>
        <h:outputStylesheet library="css" name="bootstrap.css"/>
        <h:outputScript library="js" name="bootstrap.js"/>
        <h:outputScript library="js" name="prbrcalendar.js"/>   

        <link href="../../resources/styles/style.css" rel="stylesheet" type="text/css" />

    </h:head>

    <h:body>
        <p:layout fullPage="true">

            <p:layoutUnit position="north" size="85" >
                <ui:include src="/include/header.xhtml"/>
            </p:layoutUnit>

            <p:layoutUnit position="center" size="750">
                <h:form>                     
                    <p:menubar>
                        <p:submenu label="Servidor" icon="ui-icon-bullet">
                            <p:menuitem value="Cadastrar Servidor" 
                                        action="#{servidorBean.irCadPessoal()}"
                                        ajax="false"
                                        icon="ui-icon-contact"
                                        />
                            <p:menuitem value="Cadastrar Contrato" 
                                        action="#{contratoServidorBean.irCadContratoServidor()}"
                                        ajax="false"
                                        icon="ui-icon-contact"
                                        />
                            <p:menuitem value="Lista de Servidores"
                                        action="#{servidorBean.irLista()}"
                                        ajax="false"
                                        icon="ui-icon-document"
                                        />
                            <p:menuitem value="Lista de Contratos"
                                        action="#{contratoServidorBean.irLista()}"
                                        ajax="false"
                                        icon="ui-icon-document"
                                        />
                            <p:separator />                            
                        </p:submenu>

                        <p:submenu label="Unidade" icon="ui-icon-bullet">                            
                            <p:menuitem value="Cadastrar Unidade"
                                        icon="ui-icon-contact"
                                        action="#{unidadeBean.irCadUnidade()}"
                                        ajax="false"/>                            
                            <p:menuitem value="Cadastrar Setor"
                                        icon="ui-icon-contact"
                                        action="#{setorBean.irCadSetor()}"
                                        ajax="false"/>                            
                            <p:menuitem value="Cadastrar Subsetor"
                                        icon="ui-icon-contact"
                                        action="#{subsetorBean.irCadSetor()}"
                                        ajax="false"/>                            
                            <p:menuitem value="Lista de Unidades" 
                                        action="#{unidadeBean.irLista()}" 
                                        icon="ui-icon-document" 
                                        ajax="false"/>
                        </p:submenu>

                        <p:submenu label="Configurações" icon="ui-icon-gear">
                            <p:submenu label="Cargo" icon="ui-icon-bullet">
                                <p:menuitem value="Cadastrar cargo" 
                                            icon="ui-icon-contact" 
                                            ajax="false"
                                            action="#{cargoBean.irCadCargo()}"/>
                            </p:submenu>
                            <p:submenu label="Usuário" icon="ui-icon-bullet">
                                <p:menuitem value="Cadastrar usuário" 
                                            icon="ui-icon-contact" 
                                            ajax="false"
                                            action="#{usuarioBean.irCadUsuario()}"/>
                            </p:submenu>
                        </p:submenu>
                        <p:submenu label="Relatórios" icon="ui-icon-folder-collapsed">
                            <p:menuitem value="Servidor" 
                                        icon="ui-icon-contact" 
                                        ajax="false"
                                        action="#{relatorioBean.irRelServidor()}"/>
                            <p:submenu label="Unidades" icon="ui-icon-folder-collapsed">                                
                                <p:menuitem value="Relatório geral" 
                                            icon="ui-icon-contact" 
                                            ajax="false"
                                            action="#{relatorioBean.irRelUnidade()}"/>
                                <p:menuitem value="Servidores por unidade" 
                                            icon="ui-icon-contact" 
                                            ajax="false"
                                            action="#{relatorioBean.irRelServUnd()}"/>
                            </p:submenu>
                            <p:submenu label="Setores" icon="ui-icon-folder-collapsed">
                                <p:menuitem value="Setores por unidade" 
                                            icon="ui-icon-contact" 
                                            ajax="false"
                                            action="#{relatorioBean.irRelSetorUnidade()}"/>
                                <p:menuitem value="Relatório geral" 
                                            icon="ui-icon-contact" 
                                            ajax="false"
                                            action="#{relatorioBean.irRelGeraSetor()}"/>
                            </p:submenu>
                            <p:submenu label="Subsetores" icon="ui-icon-folder-collapsed">
                                <p:menuitem value="Subsetores por setor" 
                                            icon="ui-icon-contact" 
                                            ajax="false"
                                            action="#{relatorioBean.irRelSubSetorSetor()}"/>
                                <p:menuitem value="Relatório geral" 
                                            icon="ui-icon-contact" 
                                            ajax="false"
                                            action="#{relatorioBean.irRelGeralSubSetor()}"/>
                            </p:submenu>
                        </p:submenu>

                        <f:facet name="options">                            
                            <p:commandButton 
                                value="Home" 
                                icon="ui-icon-home"
                                style="width: 100px;"
                                action="#{usuarioBean.irCadPessoal()}"
                                ajax="false"
                                />
                            <p:commandButton  
                                value="Logout" 
                                action="#{usuarioBean.sair()}"
                                icon="ui-icon-extlink" 
                                style="width: 100px;"
                                ajax="false"
                                />
                        </f:facet>
                    </p:menubar>
                </h:form>
                <ui:insert name="corpo da página"></ui:insert>
            </p:layoutUnit>

            <!--            <p:layoutUnit position="south" size="50">
                            <ui:include src="/include/footer.xhtml"/>
                            <ui:insert name="rodapé"></ui:insert>
                        </p:layoutUnit>-->

        </p:layout>

    </h:body>

</html>
